package mlp.game.shadownbolts;

import android.graphics.PointF;

public class Cloud extends Renderable {

	public Cloud(Sprite sprite, boolean bottom, int offset){
		super(sprite);
		int y = 0;
		if(bottom){
			y = RenderView.visibleScreenArea.height() - sprite.getHeight();
		}
		setPosition(new PointF(RenderView.visibleScreenArea.width() + offset, y));
	}
	
	public void update(long gameTime){
		moveBy(-20, 0);
		if(getPosition().x < -getSprite().getWidth())
			moveX(RenderView.visibleScreenArea.width());
	}
	
}
